// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'ProductProcessId',
        footer: "Foots",
        cnName: '生产工序',
        name: 'ProductProcess',
        newTabEdit: false,
        url: "/ProductProcess/",
        sortName: "ProductProcessId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"Code":"","Name":"","ProcessTypeId":"","DeviceName":"","GroupName":"","DepartmentId":[],"WorkHourPrice":"","WorkQtyPrice":"","PriceTypeId":"","IsEnabled":"","IsChecked":""};
    const editFormOptions = [[{"title":"工序编码","required":true,"field":"Code","type":"text"},
                               {"title":"工序名称","required":true,"field":"Name","type":"text"}],
                              [{"dataKey":"工序类型","data":[],"title":"工序类型","required":true,"field":"ProcessTypeId","type":"select"},
                               {"title":"设备名称","field":"DeviceName","type":"selectTable"}],
                              [{"title":"班组名称","field":"GroupName","type":"selectTable"},
                               {"dataKey":"部门级联","data":[],"title":"部门","required":true,"field":"DepartmentId","type":"cascader"}],
                              [{"title":"计时单价","required":true,"field":"WorkHourPrice","type":"decimal"},
                               {"title":"计件单价","required":true,"field":"WorkQtyPrice","type":"decimal"}],
                              [{"dataKey":"计价方式","data":[],"title":"计价方式","required":true,"field":"PriceTypeId","type":"radio"},
                               {"dataKey":"是否","data":[],"title":"是否启用","required":true,"field":"IsEnabled","type":"radio"}],
                              [{"dataKey":"是否","data":[],"title":"是否质检","required":true,"field":"IsChecked","type":"radio"}]];
    const searchFormFields = {"Code":"","Name":""};
    const searchFormOptions = [[{"title":"工序编码","field":"Code","type":"like"},{"title":"工序名称","field":"Name","type":"like"}]];
    const columns = [{field:'ProductProcessId',title:'工序标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'Code',title:'工序编码',type:'string',link:true,width:110,require:true,align:'left'},
                       {field:'Name',title:'工序名称',type:'string',width:110,require:true,align:'left'},
                       {field:'ProcessTypeId',title:'工序类型',type:'int',bind:{ key:'工序类型',data:[]},width:110,require:true,align:'left'},
                       {field:'DeviceId',title:'生产设备',type:'int',width:110,hidden:true,align:'left'},
                       {field:'DeviceName',title:'设备名称',type:'string',width:110,align:'left'},
                       {field:'GroupId',title:'班组',type:'int',width:110,hidden:true,align:'left'},
                       {field:'GroupName',title:'班组名称',type:'string',width:110,align:'left'},
                       {field:'DepartmentId',title:'部门',type:'guid',bind:{ key:'部门级联',data:[]},width:110,require:true,align:'left'},
                       {field:'DepartmentName',title:'部门名称',type:'string',width:110,hidden:true,align:'left'},
                       {field:'WorkHourPrice',title:'计时单价',type:'decimal',width:110,require:true,align:'left'},
                       {field:'WorkQtyPrice',title:'计件单价',type:'decimal',width:110,require:true,align:'left'},
                       {field:'PriceTypeId',title:'计价方式',type:'int',bind:{ key:'计价方式',data:[]},width:80,require:true,align:'left'},
                       {field:'IsEnabled',title:'是否启用',type:'int',bind:{ key:'是否',data:[]},width:110,require:true,align:'left'},
                       {field:'IsChecked',title:'是否质检',type:'int',bind:{ key:'是否',data:[]},width:80,require:true,align:'left'},
                       {field:'CreateID',title:'创建人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Creator',title:'创建人名称',type:'string',width:100,align:'left'},
                       {field:'CreateDate',title:'创建日期',type:'datetime',width:150,align:'left'},
                       {field:'ModifyID',title:'修改人标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人名称',type:'string',width:100,align:'left'},
                       {field:'ModifyDate',title:'修改日期',type:'datetime',width:150,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}